home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
186
/
mag3
/
blit.s
< prev
next >
Wrap
Text File
|
1985-05-29
|
1KB
|
39 lines
; Assembly Custom BITBLiT Routine
; a0 initially contains the physical screen's address.
; a1=the address where the "GET" snapshot is stored.
; This program is merged with a GFA program as Data statements
; ,and then read into a string. It is called with the...
; Void C:Assembly_strings_address(L:Phys_adr,L:Get_adr+6)
; The way GFA stores the Get bitblock in memory caused me a lot of
; grief. Essentially, 16 bytes are stored and then 4 null bytes
; are stored. To obtain the correct bitmap these bytes have to be
; taken into account when reading the GET string from memory.
text
movea.l 4(sp),a0 ; Obtain the physical screen's address & the
movea.l 8(sp),a1 ; address where the GET bitblock is stored.
add.l #12920,a0 ; Now a0 contains the starting address
; of the destination block.
move.w #50,d1 ; This does the actual work...
L1: move.w #15,d2 ; The destination block is 16 bytes wide
L2: move.b (a1)+,(a0)+ ; by 51 rows.
dbra d2,L2
add.l #4,a1 ; This is necessary to skip the null bytes
; that GFA stores in the GET bitblock.
add.l #144,a0 ; Line offset
dbra d1,L1
rts ; Return to GFA Basic
end